package com.jt.demo3;

import com.jt.controller.User;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/axios")
@CrossOrigin   //跨域问题
public class Ax {
    //http://localhost:8080/
    @GetMapping("/findStr")
    public String fin(){
        return "坚持";
    }
    //2.
    @GetMapping("/getByid")
    public String aa(Integer id){
        return "数据id："+id;
    }
    //3.
    @GetMapping("/findUser")
    public User findUser(User user){
        return user;
    }

    //4.1
    @GetMapping("/result/{id}/{name}/{age}")
    public User result(User user){
        return user;
    }



}
